<?php
class FileUtility
{
    public static function download($url, $savePath)
    {
        // download
        $data = file_get_contents($url);

        // save
        $filename = uniqid().'.jpg';
        file_put_contents($savePath.'/'.$filename, $data);

        return $filename;
    }
}